package com.heavenick.app.action;

import com.heavenick.app.service.SimpleService;

public class SimpleAction {
	private SimpleService simpleService ;
	
	public String operator(){
		String name = "yang hai jun ";
		String age = "123456787";
		
		Integer in = simpleService.save(name, age);
		
		System.out.println("save simple and return id is " + in);
		name = " navy yang ";
		boolean is = simpleService.update(in, name);
		int ins =100;
		simpleService.update(ins, name);
		simpleService.update(ins, name);
		                     
		simpleService.update(ins, name);
		simpleService.update(ins, name);
		simpleService.update(ins, name);
		simpleService.update(ins, name);
		
		System.out.println("update simple and return boolean is " + is);
		
		System.out.println("query simple " +simpleService.query(in).toString() );
		
		System.out.println("delete imple" + simpleService.delete(in));
		return "qwertyuiop";
	}
	
	public SimpleService getSimpleService() {
		return simpleService;
	}

	public void setSimpleService(SimpleService simpleService) {
		this.simpleService = simpleService;
	} 
}
